<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>&#193;rea do administrador</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="default.css" rel="stylesheet" type="text/css" media="screen" />


    </h:head>
    <body>
     <f:view>
         <f:event type="preRenderView" listener="#{userBean.isAdmin}"/>
            <h:body>
                <div id="header">
                    <div id="msgLogin">
                        <h:outputText rendered="#{userBean.logado}" value="Ol&#193;, #{userBean.nome}"></h:outputText>
                    </div>
                    <ui:include src="campologin.xhtml"></ui:include>
                </div>

                <div id="subcorpo2">
                    <div id="barradivisora"></div>
                    <ui:include src="menuhorizontal.xhtml"></ui:include>
                        <div id="campos">
                            <h3>P&#193;GINA DO ADMINISTRADOR</h3><br></br>
                                <div id="campos">
                                    <h:form>
                                    <h4>Selecione a p&#225;gina a qual deseja alterar:</h4>
                                    <div id="barraTitulo"></div><br></br>
                                    <h:selectOneRadio value="#{pagBean.nome}">
                                                    <f:selectItem itemValue="home" itemLabel="Home" /> 
                                                    <f:selectItem itemValue="principaisanalises" itemLabel="Principais An&#225;lises" />
                                                    <f:selectItem itemValue="principaisteoricos" itemLabel="Principais Te&#243;ricos" />
                                                    <f:selectItem itemValue="bancodeimagens" itemLabel="Banco de Imagens" />
                                     </h:selectOneRadio>
                                    <br></br><br></br>
                                     <h4>Refer&#234;ncia</h4>
                                     <div id="barraTitulo"></div><br></br>
                                     <h:selectOneRadio value="#{pagBean.referencia}">
                                                    <f:selectItem itemValue="0" itemLabel="Primeiro Texto" />
                                                    <f:selectItem itemValue="1" itemLabel="Segundo Texto" />
                                                    <f:selectItem itemValue="2" itemLabel="Terceiro Texto" />
                                                    <f:selectItem itemValue="3" itemLabel="Quarto Texto" />
                                                    
                                     </h:selectOneRadio>
                                     <br></br>
                                     <div id="textosfig"></div>
                                    <br></br><br></br>
                                    <h4>Editor de conte&#250;do:</h4>
                                    <div id="barraTitulo"></div><br></br>
                                    <div id="areaTexto">
                                    <ui:include src="editor.xhtml"></ui:include>
                                     </div>
                                    <br></br><br></br><br></br><br></br>
                                    <p:dataTable style="margin-left: -20px" var="usuario" value="#{novoUserBean.usuarios}">
                                            <p:column>
                                                <f:facet name="header">
                                                        Nome
                                                </f:facet>
                                                <h:outputText value="#{usuario.nome}" />
                                            </p:column>

                                            <p:column>
                                                <f:facet name="header">
                                                        RG
                                                </f:facet>
                                                <h:outputText value="#{usuario.rg}" />
                                            </p:column>

                                            <p:column>
                                                <f:facet name="header">
                                                        Justificativa
                                                </f:facet>
                                                <h:outputText value="#{usuario.justificativa}" />
                                            </p:column>
                                        <p:column>
                                                <f:facet name="header">
                                                        N. Atual
                                                </f:facet>
                                            <h:outputText value="#{usuario.nivelAcesso}" />
                                        </p:column>
                                        <p:column>
                                                <f:facet name="header">
                                                        N. Novo
                                                </f:facet>
                                            <h:commandButton value="0" action="#{usuario.alterato0}"/>
                                            <h:commandButton value="1" action="#{usuario.alterato1}"/>
                                            <h:commandButton value="2" action="#{usuario.alterato2}"/>
                                            </p:column>
                                        </p:dataTable>
                                        
                                    </h:form>
                                </div>

                        </div>
                    <div id="footer"><div id="sign"><p>Copyright &copy; 2012 BANCO DE IMAGENS. Developed by BDIPA Ltda.</p></div></div>
                </div>

            </h:body>
    </f:view>
   </body>
</html>